package com.scud.client.product;

import com.scud.model.cart.vo.CartItemVo;
import com.scud.model.order.pojo.OrderDetails;
import com.scud.model.order.vo.ManageOrderVo;
import com.scud.model.order.vo.OrderSkuVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author vermouth
 */
@FeignClient(value = "scud-store-product")
public interface IProductClient {

    //获取商品信息集合
    @PostMapping("/api/product/feign/getOrderSkuVoList")
    List<OrderSkuVo> getOrderSkuVoList(@RequestBody List<OrderDetails> orderDetailsList);

    @PostMapping("/api/product/feign/getCartSku")
    List<CartItemVo> getCartSku(@RequestBody List<CartItemVo> cartList);

    @PostMapping("/api/product/feign/resetStock")
    void resetStock(@RequestBody Map<String, Integer> skus);

    @PostMapping("/api/product/feign/getManageOrder")
    List<ManageOrderVo> getManageOrderPage(@RequestBody List<ManageOrderVo> orderDetailsList);
}
